package com.scalar.chiptrack.operations.dataentry.inventory.forms;

import com.scalar.chiptrack.operations.dataentry.LotDetails;
import com.scalar.chiptrack.operations.dataentry.test.TestBinInfo;
import com.scalar.chiptrack.ChipTrackActionForm;
import org.apache.struts.action.ActionMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by IntelliJ IDEA.
 * User: Sudhakar
 * Date: Oct 06, 2006
 * Time: 12:28:08 AM
 */
public class InventoryDataEntryForm extends ChipTrackActionForm
{
    private String processType      = null;
    private String processStepId    = null;
    private String locationId       = null;
    private String lotId            = null;
    private String fabLotNo         = null;
    private int grossDie            = -1;

    private LotDetails invLotDetails;

    public String getLotId() {
        return lotId;
    }

    public void setLotId(String lotId) {
        this.lotId = lotId;
    }

    public String getProcessStepId() {
        return processStepId;
    }

    public void setProcessStepId(String processStepId) {
        this.processStepId = processStepId;
    }

    public String getLocationId() {
        return locationId;
    }

    public void setLocationId(String locationId) {
        this.locationId = locationId;
    }

    public LotDetails getInvLotDetails() {
        return invLotDetails;
    }

    public void setInvLotDetails(LotDetails invLotDetails) {
        this.invLotDetails = invLotDetails;
    }

    public String getProcessType() {
        return processType;
    }

    public void setProcessType(String processType) {
        this.processType = processType;
    }

    public String getFabLotNo() {
        return fabLotNo;
    }

    public void setFabLotNo(String fabLotNo) {
        this.fabLotNo = fabLotNo;
    }


    public int getGrossDie() {
        return grossDie;
    }

    public void setGrossDie(int grossDie) {
        this.grossDie = grossDie;
    }

    public void reset(ActionMapping actionMapping, HttpServletRequest httpServletRequest)
    {
        if( invLotDetails != null )
        {
           for(int i=0; i< invLotDetails.getBinList().size(); i++ )
           {
               TestBinInfo testBinInfo = ( TestBinInfo)invLotDetails.getBinList().get(i);

               testBinInfo.setWaferId( null );
               testBinInfo.setBinQty( null );
           }
        }
    }
}
